package cn.itcast.controller.system;
import cn.itcast.base.BaseController;
import cn.itcast.service.system.SysLogService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping(value = "/system/log")
public class SysController extends BaseController {
    @Autowired
    private SysLogService sysLogService;

    @RequestMapping(value = "/list", name = "日志的分页数据查询")
    public String findAll(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "4") int pageSize) {
        PageInfo pageInfo = sysLogService.findAll(pageNum, pageSize, companyId);
        request.setAttribute("page", pageInfo);
        return "system/log/log-list";

    }
}
